package com.qyi.activemq.queue.consumer;

import lombok.extern.slf4j.Slf4j;
import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Service;

/**
 * @author luqi
 * @Date 2021/3/11 10:09
 * @Description TODO
 */
@Service
@Slf4j
public class MqConsumerService {

    @JmsListener(destination = "q1-queue", containerFactory = "jmsListenerContainerQueue", concurrency = "5")
    public void receiveStringQueue(String msg) throws Exception {
        log.info("consumer q1-queue:{}", msg);
        Thread.sleep(500);
    }

}
